
function AFU_Validate( val )
{
	var el1 = document.getElementById( val.controltovalidate + "_value" );
	var el2 = document.getElementById( val.controltovalidate + "_fileupload" );
	var el3 = document.getElementById( val.controltovalidate + "_currentmode" );
	if( el1 == null || el2 == null || el3 == null ) return false;
	
	if( el3.value == "select" )
	{
		var strValue = ValidatorTrim( el1.value );
		if( strValue == "" ) return false;
		return true;
	}
	else
	{
		var strValue = ValidatorTrim( el2.value );
		if( strValue == "" ) return false;
		return true;
	}
}
